<div class="modal-header">
  <a class="btn btn-mini pull-right" data-dismiss="modal">
    <i class="grcicon-x-grey"></i>
  </a>
  <h2> Controls Mapped to <small>{{slug}}</small> </h2>
</div>

<div class="modal-body" data-section-id="{{id}}">
  {{#if linked_controls.length}}
  <div class="row-fluid">
    <div class="span6 control-group">
      <h3>Regulation Controls</h3>
    </div>
    <div class="span6 control-group">
      <h3>Company Controls</h3>
    </div>
  </div>

  {{#rcontrols this}}
    {{#foo_controls}}
    <section class="modal-section">
      <div class="row-fluid">
        <div class="span6 control-group">
          <ul class="tree-structure">
            <li {{data 'model'}} data-model="true">
              {{> /assets/controls/show_unmap_dialog.mustache}}
            </li>
          </ul>
        </div>
        <div class="span6 control-group" data-rcontrol-id="{{id}}">
          <ul class="tree-structure">
            {{#implementing_controls}}
              <li {{data 'model'}} data-model="true">
              {{> /assets/controls/show_unmap_dialog.mustache}}
              </li>
            {{/implementing_controls}}
          </ul>
        </div>
      </div>
    </section>
    {{/foo_controls}}
  {{/rcontrols}}
  {{else}}
    <div class="span6 well">
      <input name="section[na]" type="hidden" value="0">
      <input class="checkbox" id="section_na" name="section[na]" type="checkbox" value="1" {{#na}}checked="checked"{{/na}}>
      <h3 class="inline">
        &nbsp;No controls implemented for this section
      </h3>
    </div>
  {{/if}}
  <br class="no-float">
  <div class="row-fluid">
    <label class="cleanlabel" for="section_notes">Note</label>
  </div>
  <div class="row-fluid">
    <div class="span12">
      <div class="wysiwyg-area">
        <textarea class="span12 note wysihtml5" cols="40" id="section_notes" name="section[notes]" rows="3" {{ (el) -> setTimeout(function() { $(el).cms_wysihtml5(); }, 1); }}>{{notes}}</textarea>
      </div>
    </div>
  </div>
  <br>
  <div class="row-fluid">
    <div class="span3"></div>
    <div class="span3"></div>
    <div class="span3"> </div>
    <div class="span3">
    {{!
      <label class="fltrt" for="control-verificationdate"><strong>Approved</strong>:
        <span class="statustextred">Not Approved</span>
      </label>
    }} &nbsp;
    </div>
  </div>
  </div>

<div class="modal-footer">
  <div class="row-fluid">
    <nav class="span6">
      <!-- <input class="btn btn-large btn-info closebtn" name="commit" type="button" value="Cancel"> -->
    </nav>
    <nav class="span6">
      <div class="confirm-buttons">
        <div class="btn closebtn btn-primary"> Done </div>
      </div>
    </nav>
  </div>
</div>

